<?php
//module/Authentication/view/authentication/auth/login.phtml
$title = 'Asistencia Login';
$this->headTitle($title);
?>
<h2><?php echo $this->escapeHtml($title); ?></h2>

<?php
$form = $this->form;
$form->setAttribute('action', $this->url(
    'login/process',
    array(
        'action'     => 'authenticate',
    )
));
$form->prepare();
?>

<?php
echo $this->form()->openTag($form);
//echo $this->formCollection($form);
echo $this->formRow($form->get('username'));
echo $this->formRow($form->get('password'));
echo $this->formRow($form->get('rememberme'));
?>

<p style="text-indent: 16em;"><?php echo $this->formRow($form->get('submit')); ?></p>

<?php
echo $this->form()->closeTag();
 
if ($this->messages){
   echo '<ul>';
   $rec_p = true;
   foreach($this->messages as $message) {
      echo '<li>'.$message.'</li>';
      //if ($message == "You've been logged out")
      if ($message == "Sesión terminada.")
         $rec_p = false;
   }
   echo '</ul>';
   echo '<br>';

   if ($rec_p)
      echo '<a href="passwd">Ha olvidado su contraseña?</a>';
}
